//
// Created by "huxiao" on 2025/5/24 17:52
//

/**
#include <QApplication>
#include <QPushButton>
#include "utils/httpUtil/HttpUtil.h"
#define CONFIG_PATH ":/config/config.json"

int main(int argc, char *argv[]) {
    QApplication a(argc, argv);
    QPushButton btn;
    // 设置大小
    btn.setFixedSize(200, 50);
    btn.setText("Click Me");
    btn.show();
    // 绑定点击
    QObject::connect(&btn, &QPushButton::clicked, [=]() {
        json loginData = {
            {"username", "admin"},
            {"password", "123456"}
        };
        HttpUtil::instance().post("/user/login", loginData,
                                  [](const nlohmann::json &response) {
                                      qDebug() << "POST success:" << QString::fromStdString(response.dump());
                                  },
                                  [](const QString &error) {
                                      qDebug() << "POST error:" << error;
                                  }
        );
    });
    return QApplication::exec();
}
*/
